{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'C:\\\\Users\\\\6\\\\Desktop\\\\objectForPClass'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#更改工作路径\n",
    "import os\n",
    "os.getcwd()\n",
    "# os.chdir(r\"C:\\Users\\6\\Desktop\\课内学习文件\\python\\python大作业\\复现别人项目\\face_serve\")\n",
    "os.chdir(os.path.join(os.getcwd()))\n",
    "os.getcwd()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "facePath=r'C:\\Users\\6\\Anaconda3\\Lib\\site-packages\\cv2\\data\\haarcascade_frontalface_alt2.xml'\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./face_serve/1/0.jpg\n",
      "./face_serve/1/1.jpg\n",
      "./face_serve/1/2.jpg\n",
      "./face_serve/1/3.jpg\n",
      "./face_serve/1/4.jpg\n",
      "./face_serve/1/5.jpg\n",
      "./face_serve/1/6.jpg\n",
      "./face_serve/1/7.jpg\n",
      "./face_serve/1/8.jpg\n",
      "./face_serve/1/9.jpg\n",
      "./face_serve/1/10.jpg\n",
      "./face_serve/1/11.jpg\n",
      "./face_serve/1/12.jpg\n",
      "./face_serve/1/13.jpg\n",
      "./face_serve/1/14.jpg\n",
      "./face_serve/1/15.jpg\n",
      "./face_serve/1/16.jpg\n",
      "./face_serve/1/17.jpg\n",
      "./face_serve/1/18.jpg\n",
      "./face_serve/1/19.jpg\n",
      "./face_serve/1/20.jpg\n",
      "./face_serve/1/21.jpg\n",
      "./face_serve/1/22.jpg\n",
      "./face_serve/1/23.jpg\n",
      "./face_serve/1/24.jpg\n",
      "./face_serve/1/25.jpg\n",
      "./face_serve/1/26.jpg\n",
      "./face_serve/1/27.jpg\n",
      "./face_serve/1/28.jpg\n",
      "./face_serve/1/29.jpg\n",
      "./face_serve/1/30.jpg\n",
      "./face_serve/1/31.jpg\n",
      "./face_serve/1/32.jpg\n",
      "./face_serve/1/33.jpg\n",
      "./face_serve/1/34.jpg\n",
      "./face_serve/1/35.jpg\n",
      "./face_serve/1/36.jpg\n",
      "./face_serve/1/37.jpg\n",
      "./face_serve/1/38.jpg\n",
      "./face_serve/1/39.jpg\n",
      "./face_serve/1/40.jpg\n",
      "./face_serve/1/41.jpg\n",
      "./face_serve/1/42.jpg\n",
      "./face_serve/1/43.jpg\n",
      "./face_serve/1/44.jpg\n",
      "./face_serve/1/45.jpg\n",
      "./face_serve/1/46.jpg\n",
      "./face_serve/1/47.jpg\n",
      "./face_serve/1/48.jpg\n",
      "./face_serve/1/49.jpg\n",
      "./face_serve/1/50.jpg\n",
      "./face_serve/1/51.jpg\n",
      "./face_serve/1/52.jpg\n",
      "./face_serve/1/53.jpg\n",
      "./face_serve/1/54.jpg\n",
      "./face_serve/1/55.jpg\n",
      "./face_serve/1/56.jpg\n",
      "./face_serve/1/57.jpg\n",
      "./face_serve/1/58.jpg\n",
      "./face_serve/1/59.jpg\n",
      "./face_serve/1/60.jpg\n",
      "./face_serve/1/61.jpg\n",
      "./face_serve/1/62.jpg\n",
      "./face_serve/1/63.jpg\n",
      "./face_serve/1/64.jpg\n",
      "./face_serve/1/65.jpg\n",
      "./face_serve/1/66.jpg\n",
      "./face_serve/1/67.jpg\n",
      "./face_serve/1/68.jpg\n",
      "./face_serve/1/69.jpg\n",
      "./face_serve/1/70.jpg\n",
      "./face_serve/1/71.jpg\n",
      "./face_serve/1/72.jpg\n",
      "./face_serve/1/73.jpg\n",
      "./face_serve/1/74.jpg\n",
      "./face_serve/1/75.jpg\n",
      "./face_serve/1/76.jpg\n",
      "./face_serve/1/77.jpg\n",
      "./face_serve/1/78.jpg\n",
      "./face_serve/1/79.jpg\n",
      "./face_serve/1/80.jpg\n",
      "./face_serve/1/81.jpg\n",
      "./face_serve/1/82.jpg\n",
      "./face_serve/1/83.jpg\n",
      "./face_serve/1/84.jpg\n",
      "./face_serve/1/85.jpg\n",
      "./face_serve/1/86.jpg\n",
      "./face_serve/1/87.jpg\n",
      "./face_serve/1/88.jpg\n",
      "./face_serve/1/89.jpg\n",
      "./face_serve/1/90.jpg\n",
      "./face_serve/1/91.jpg\n",
      "./face_serve/1/92.jpg\n",
      "./face_serve/1/93.jpg\n",
      "./face_serve/1/94.jpg\n",
      "./face_serve/1/95.jpg\n",
      "./face_serve/1/96.jpg\n",
      "./face_serve/1/97.jpg\n",
      "./face_serve/1/98.jpg\n",
      "./face_serve/1/99.jpg\n",
      "./face_serve/1/100.jpg\n",
      "./face_serve/1/101.jpg\n",
      "./face_serve/1/102.jpg\n",
      "./face_serve/1/103.jpg\n",
      "./face_serve/1/104.jpg\n",
      "./face_serve/1/105.jpg\n",
      "./face_serve/1/106.jpg\n",
      "./face_serve/1/107.jpg\n",
      "./face_serve/1/108.jpg\n",
      "./face_serve/1/109.jpg\n",
      "./face_serve/1/110.jpg\n",
      "./face_serve/1/111.jpg\n",
      "./face_serve/1/112.jpg\n",
      "./face_serve/1/113.jpg\n",
      "./face_serve/1/114.jpg\n",
      "./face_serve/1/115.jpg\n",
      "./face_serve/1/116.jpg\n",
      "./face_serve/1/117.jpg\n",
      "./face_serve/1/118.jpg\n",
      "./face_serve/1/119.jpg\n",
      "./face_serve/1/120.jpg\n",
      "./face_serve/1/121.jpg\n",
      "./face_serve/1/122.jpg\n",
      "./face_serve/1/123.jpg\n",
      "./face_serve/1/124.jpg\n",
      "./face_serve/1/125.jpg\n",
      "./face_serve/1/126.jpg\n",
      "./face_serve/1/127.jpg\n",
      "./face_serve/1/128.jpg\n",
      "./face_serve/1/129.jpg\n",
      "./face_serve/1/130.jpg\n",
      "./face_serve/1/131.jpg\n",
      "./face_serve/1/132.jpg\n",
      "./face_serve/1/133.jpg\n",
      "./face_serve/1/134.jpg\n",
      "./face_serve/1/135.jpg\n",
      "./face_serve/1/136.jpg\n",
      "./face_serve/1/137.jpg\n",
      "./face_serve/1/138.jpg\n",
      "./face_serve/1/139.jpg\n",
      "./face_serve/1/140.jpg\n",
      "./face_serve/1/141.jpg\n",
      "./face_serve/1/142.jpg\n",
      "./face_serve/1/143.jpg\n",
      "./face_serve/1/144.jpg\n",
      "./face_serve/1/145.jpg\n",
      "./face_serve/1/146.jpg\n",
      "./face_serve/1/147.jpg\n",
      "./face_serve/1/148.jpg\n",
      "./face_serve/1/149.jpg\n",
      "./face_serve/1/150.jpg\n",
      "./face_serve/1/151.jpg\n",
      "./face_serve/1/152.jpg\n",
      "./face_serve/1/153.jpg\n",
      "./face_serve/1/154.jpg\n",
      "./face_serve/1/155.jpg\n",
      "./face_serve/1/156.jpg\n",
      "./face_serve/1/157.jpg\n",
      "./face_serve/1/158.jpg\n",
      "./face_serve/1/159.jpg\n",
      "./face_serve/1/160.jpg\n",
      "./face_serve/1/161.jpg\n",
      "./face_serve/1/162.jpg\n",
      "./face_serve/1/163.jpg\n",
      "./face_serve/1/164.jpg\n",
      "./face_serve/1/165.jpg\n",
      "./face_serve/1/166.jpg\n",
      "./face_serve/1/167.jpg\n",
      "./face_serve/1/168.jpg\n",
      "./face_serve/1/169.jpg\n",
      "./face_serve/1/170.jpg\n",
      "./face_serve/1/171.jpg\n",
      "./face_serve/1/172.jpg\n",
      "./face_serve/1/173.jpg\n",
      "./face_serve/1/174.jpg\n",
      "./face_serve/1/175.jpg\n",
      "./face_serve/1/176.jpg\n",
      "./face_serve/1/177.jpg\n",
      "./face_serve/1/178.jpg\n",
      "./face_serve/1/179.jpg\n",
      "./face_serve/1/180.jpg\n",
      "./face_serve/1/181.jpg\n",
      "./face_serve/1/182.jpg\n",
      "./face_serve/1/183.jpg\n",
      "./face_serve/1/184.jpg\n",
      "./face_serve/1/185.jpg\n",
      "./face_serve/1/186.jpg\n",
      "./face_serve/1/187.jpg\n",
      "./face_serve/1/188.jpg\n",
      "./face_serve/1/189.jpg\n",
      "./face_serve/1/190.jpg\n",
      "./face_serve/1/191.jpg\n",
      "./face_serve/1/192.jpg\n",
      "./face_serve/1/193.jpg\n",
      "./face_serve/1/194.jpg\n",
      "./face_serve/1/195.jpg\n",
      "./face_serve/1/196.jpg\n",
      "./face_serve/1/197.jpg\n",
      "./face_serve/1/198.jpg\n",
      "./face_serve/1/199.jpg\n",
      "./face_serve/1/200.jpg\n",
      "./face_serve/1/201.jpg\n",
      "./face_serve/1/202.jpg\n",
      "./face_serve/1/203.jpg\n",
      "./face_serve/1/204.jpg\n",
      "./face_serve/1/205.jpg\n",
      "./face_serve/1/206.jpg\n",
      "./face_serve/1/207.jpg\n",
      "./face_serve/1/208.jpg\n",
      "./face_serve/1/209.jpg\n",
      "./face_serve/1/210.jpg\n",
      "./face_serve/1/211.jpg\n",
      "./face_serve/1/212.jpg\n",
      "./face_serve/1/213.jpg\n",
      "./face_serve/1/214.jpg\n",
      "./face_serve/1/215.jpg\n",
      "./face_serve/1/216.jpg\n",
      "./face_serve/1/217.jpg\n",
      "./face_serve/1/218.jpg\n",
      "./face_serve/1/219.jpg\n",
      "./face_serve/1/220.jpg\n",
      "./face_serve/1/221.jpg\n",
      "./face_serve/1/222.jpg\n",
      "./face_serve/1/223.jpg\n",
      "./face_serve/1/224.jpg\n",
      "./face_serve/1/225.jpg\n",
      "./face_serve/1/226.jpg\n",
      "./face_serve/1/227.jpg\n",
      "./face_serve/1/228.jpg\n",
      "./face_serve/1/229.jpg\n",
      "./face_serve/1/230.jpg\n",
      "./face_serve/1/231.jpg\n",
      "./face_serve/1/232.jpg\n",
      "./face_serve/1/233.jpg\n",
      "./face_serve/1/234.jpg\n",
      "./face_serve/1/235.jpg\n",
      "./face_serve/1/236.jpg\n",
      "./face_serve/1/237.jpg\n",
      "./face_serve/1/238.jpg\n",
      "./face_serve/1/239.jpg\n",
      "./face_serve/1/240.jpg\n",
      "./face_serve/1/241.jpg\n",
      "./face_serve/1/242.jpg\n",
      "./face_serve/1/243.jpg\n",
      "./face_serve/1/244.jpg\n",
      "./face_serve/1/245.jpg\n",
      "./face_serve/1/246.jpg\n",
      "./face_serve/1/247.jpg\n",
      "./face_serve/1/248.jpg\n",
      "./face_serve/1/249.jpg\n",
      "./face_serve/1/250.jpg\n",
      "./face_serve/1/251.jpg\n",
      "./face_serve/1/252.jpg\n",
      "./face_serve/1/253.jpg\n",
      "./face_serve/1/254.jpg\n",
      "./face_serve/1/255.jpg\n",
      "./face_serve/1/256.jpg\n",
      "./face_serve/1/257.jpg\n",
      "./face_serve/1/258.jpg\n",
      "./face_serve/1/259.jpg\n",
      "./face_serve/1/260.jpg\n",
      "./face_serve/1/261.jpg\n",
      "./face_serve/1/262.jpg\n",
      "./face_serve/1/263.jpg\n",
      "./face_serve/1/264.jpg\n",
      "./face_serve/1/265.jpg\n",
      "./face_serve/1/266.jpg\n",
      "./face_serve/1/267.jpg\n",
      "./face_serve/1/268.jpg\n",
      "./face_serve/1/269.jpg\n",
      "./face_serve/1/270.jpg\n",
      "./face_serve/1/271.jpg\n",
      "./face_serve/1/272.jpg\n",
      "./face_serve/1/273.jpg\n",
      "./face_serve/1/274.jpg\n",
      "./face_serve/1/275.jpg\n",
      "./face_serve/1/276.jpg\n",
      "./face_serve/1/277.jpg\n",
      "./face_serve/1/278.jpg\n",
      "./face_serve/1/279.jpg\n",
      "./face_serve/1/280.jpg\n",
      "./face_serve/1/281.jpg\n",
      "./face_serve/1/282.jpg\n",
      "./face_serve/1/283.jpg\n",
      "./face_serve/1/284.jpg\n",
      "./face_serve/1/285.jpg\n",
      "./face_serve/1/286.jpg\n",
      "./face_serve/1/287.jpg\n",
      "./face_serve/1/288.jpg\n",
      "./face_serve/1/289.jpg\n",
      "./face_serve/1/290.jpg\n",
      "./face_serve/1/291.jpg\n",
      "./face_serve/1/292.jpg\n",
      "./face_serve/1/293.jpg\n",
      "./face_serve/1/294.jpg\n",
      "./face_serve/1/295.jpg\n",
      "./face_serve/1/296.jpg\n",
      "./face_serve/1/297.jpg\n",
      "./face_serve/1/298.jpg\n",
      "./face_serve/1/299.jpg\n",
      "./face_serve/1/300.jpg\n",
      "./face_serve/1/301.jpg\n",
      "./face_serve/1/302.jpg\n",
      "./face_serve/1/303.jpg\n",
      "./face_serve/1/304.jpg\n",
      "./face_serve/1/305.jpg\n",
      "./face_serve/1/306.jpg\n",
      "./face_serve/1/307.jpg\n",
      "./face_serve/1/308.jpg\n",
      "./face_serve/1/309.jpg\n",
      "./face_serve/1/310.jpg\n",
      "./face_serve/1/311.jpg\n",
      "./face_serve/1/312.jpg\n",
      "./face_serve/1/313.jpg\n",
      "./face_serve/1/314.jpg\n",
      "./face_serve/1/315.jpg\n",
      "./face_serve/1/316.jpg\n",
      "./face_serve/1/317.jpg\n",
      "./face_serve/1/318.jpg\n",
      "./face_serve/1/319.jpg\n",
      "./face_serve/1/320.jpg\n",
      "./face_serve/1/321.jpg\n",
      "./face_serve/1/322.jpg\n",
      "./face_serve/1/323.jpg\n",
      "./face_serve/1/324.jpg\n",
      "./face_serve/1/325.jpg\n",
      "./face_serve/1/326.jpg\n",
      "./face_serve/1/327.jpg\n",
      "./face_serve/1/328.jpg\n",
      "./face_serve/1/329.jpg\n",
      "./face_serve/1/330.jpg\n",
      "./face_serve/1/331.jpg\n",
      "./face_serve/1/332.jpg\n",
      "./face_serve/1/333.jpg\n",
      "./face_serve/1/334.jpg\n",
      "./face_serve/1/335.jpg\n",
      "./face_serve/1/336.jpg\n",
      "./face_serve/1/337.jpg\n",
      "./face_serve/1/338.jpg\n",
      "./face_serve/1/339.jpg\n",
      "./face_serve/1/340.jpg\n",
      "./face_serve/1/341.jpg\n",
      "./face_serve/1/342.jpg\n",
      "./face_serve/1/343.jpg\n",
      "./face_serve/1/344.jpg\n",
      "./face_serve/1/345.jpg\n",
      "./face_serve/1/346.jpg\n",
      "./face_serve/1/347.jpg\n",
      "./face_serve/1/348.jpg\n",
      "./face_serve/1/349.jpg\n",
      "./face_serve/1/350.jpg\n",
      "./face_serve/1/351.jpg\n",
      "./face_serve/1/352.jpg\n",
      "./face_serve/1/353.jpg\n",
      "./face_serve/1/354.jpg\n",
      "./face_serve/1/355.jpg\n",
      "./face_serve/1/356.jpg\n",
      "./face_serve/1/357.jpg\n",
      "./face_serve/1/358.jpg\n",
      "./face_serve/1/359.jpg\n",
      "./face_serve/1/360.jpg\n",
      "./face_serve/1/361.jpg\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./face_serve/1/362.jpg\n",
      "./face_serve/1/363.jpg\n",
      "./face_serve/1/364.jpg\n",
      "./face_serve/1/365.jpg\n",
      "./face_serve/1/366.jpg\n",
      "./face_serve/1/367.jpg\n",
      "./face_serve/1/368.jpg\n",
      "./face_serve/1/369.jpg\n",
      "./face_serve/1/370.jpg\n",
      "./face_serve/1/371.jpg\n",
      "./face_serve/1/372.jpg\n",
      "./face_serve/1/373.jpg\n",
      "./face_serve/1/374.jpg\n",
      "./face_serve/1/375.jpg\n",
      "./face_serve/1/376.jpg\n",
      "./face_serve/1/377.jpg\n",
      "./face_serve/1/378.jpg\n",
      "./face_serve/1/379.jpg\n",
      "./face_serve/1/380.jpg\n",
      "./face_serve/1/381.jpg\n",
      "./face_serve/1/382.jpg\n",
      "./face_serve/1/383.jpg\n",
      "./face_serve/1/384.jpg\n",
      "./face_serve/1/385.jpg\n",
      "./face_serve/1/386.jpg\n",
      "./face_serve/1/387.jpg\n",
      "./face_serve/1/388.jpg\n",
      "./face_serve/1/389.jpg\n",
      "./face_serve/1/390.jpg\n",
      "./face_serve/1/391.jpg\n",
      "./face_serve/1/392.jpg\n",
      "./face_serve/1/393.jpg\n",
      "./face_serve/1/394.jpg\n",
      "./face_serve/1/395.jpg\n",
      "./face_serve/1/396.jpg\n",
      "./face_serve/1/397.jpg\n",
      "./face_serve/1/398.jpg\n",
      "./face_serve/1/399.jpg\n",
      "./face_serve/1/400.jpg\n",
      "./face_serve/1/401.jpg\n",
      "./face_serve/1/402.jpg\n",
      "./face_serve/1/403.jpg\n",
      "./face_serve/1/404.jpg\n",
      "./face_serve/1/405.jpg\n",
      "./face_serve/1/406.jpg\n",
      "./face_serve/1/407.jpg\n",
      "./face_serve/1/408.jpg\n",
      "./face_serve/1/409.jpg\n",
      "./face_serve/1/410.jpg\n",
      "./face_serve/1/411.jpg\n",
      "./face_serve/1/412.jpg\n",
      "./face_serve/1/413.jpg\n",
      "./face_serve/1/414.jpg\n",
      "./face_serve/1/415.jpg\n",
      "./face_serve/1/416.jpg\n",
      "./face_serve/1/417.jpg\n",
      "./face_serve/1/418.jpg\n",
      "./face_serve/1/419.jpg\n",
      "./face_serve/1/420.jpg\n",
      "./face_serve/1/421.jpg\n",
      "./face_serve/1/422.jpg\n",
      "./face_serve/1/423.jpg\n",
      "./face_serve/1/424.jpg\n",
      "./face_serve/1/425.jpg\n",
      "./face_serve/1/426.jpg\n",
      "./face_serve/1/427.jpg\n",
      "./face_serve/1/428.jpg\n",
      "./face_serve/1/429.jpg\n",
      "./face_serve/1/430.jpg\n",
      "./face_serve/1/431.jpg\n",
      "./face_serve/1/432.jpg\n",
      "./face_serve/1/433.jpg\n",
      "./face_serve/1/434.jpg\n",
      "./face_serve/1/435.jpg\n",
      "./face_serve/1/436.jpg\n",
      "./face_serve/1/437.jpg\n",
      "./face_serve/1/438.jpg\n",
      "./face_serve/1/439.jpg\n",
      "./face_serve/1/440.jpg\n",
      "./face_serve/1/441.jpg\n",
      "./face_serve/1/442.jpg\n",
      "./face_serve/1/443.jpg\n",
      "./face_serve/1/444.jpg\n",
      "./face_serve/1/445.jpg\n",
      "./face_serve/1/446.jpg\n",
      "./face_serve/1/447.jpg\n",
      "./face_serve/1/448.jpg\n",
      "./face_serve/1/449.jpg\n",
      "./face_serve/1/450.jpg\n",
      "./face_serve/1/451.jpg\n",
      "./face_serve/1/452.jpg\n",
      "./face_serve/1/453.jpg\n",
      "./face_serve/1/454.jpg\n",
      "./face_serve/1/455.jpg\n",
      "./face_serve/1/456.jpg\n",
      "./face_serve/1/457.jpg\n",
      "./face_serve/1/458.jpg\n",
      "./face_serve/1/459.jpg\n",
      "./face_serve/1/460.jpg\n",
      "./face_serve/1/461.jpg\n",
      "./face_serve/1/462.jpg\n",
      "./face_serve/1/463.jpg\n",
      "./face_serve/1/464.jpg\n",
      "./face_serve/1/465.jpg\n",
      "./face_serve/1/466.jpg\n",
      "./face_serve/1/467.jpg\n",
      "./face_serve/1/468.jpg\n",
      "./face_serve/1/469.jpg\n",
      "./face_serve/1/470.jpg\n",
      "./face_serve/1/471.jpg\n",
      "./face_serve/1/472.jpg\n",
      "./face_serve/1/473.jpg\n",
      "./face_serve/1/474.jpg\n",
      "./face_serve/1/475.jpg\n",
      "./face_serve/1/476.jpg\n",
      "./face_serve/1/477.jpg\n",
      "./face_serve/1/478.jpg\n",
      "./face_serve/1/479.jpg\n",
      "./face_serve/1/480.jpg\n",
      "./face_serve/1/481.jpg\n",
      "./face_serve/1/482.jpg\n",
      "./face_serve/1/483.jpg\n",
      "./face_serve/1/484.jpg\n",
      "./face_serve/1/485.jpg\n",
      "./face_serve/1/486.jpg\n",
      "./face_serve/1/487.jpg\n",
      "./face_serve/1/488.jpg\n",
      "./face_serve/1/489.jpg\n",
      "./face_serve/1/490.jpg\n",
      "./face_serve/1/491.jpg\n",
      "./face_serve/1/492.jpg\n",
      "./face_serve/1/493.jpg\n",
      "./face_serve/1/494.jpg\n",
      "./face_serve/1/495.jpg\n",
      "./face_serve/1/496.jpg\n",
      "./face_serve/1/497.jpg\n",
      "./face_serve/1/498.jpg\n",
      "./face_serve/1/499.jpg\n",
      "./face_serve/1/500.jpg\n",
      "./face_serve/1/501.jpg\n",
      "./face_serve/1/502.jpg\n",
      "./face_serve/1/503.jpg\n",
      "./face_serve/1/504.jpg\n",
      "./face_serve/1/505.jpg\n",
      "./face_serve/1/506.jpg\n",
      "./face_serve/1/507.jpg\n",
      "./face_serve/1/508.jpg\n",
      "./face_serve/1/509.jpg\n",
      "./face_serve/1/510.jpg\n",
      "./face_serve/1/511.jpg\n",
      "./face_serve/1/512.jpg\n",
      "./face_serve/1/513.jpg\n",
      "./face_serve/1/514.jpg\n",
      "./face_serve/1/515.jpg\n",
      "./face_serve/1/516.jpg\n",
      "./face_serve/1/517.jpg\n",
      "./face_serve/1/518.jpg\n",
      "./face_serve/1/519.jpg\n",
      "./face_serve/1/520.jpg\n",
      "./face_serve/1/521.jpg\n",
      "./face_serve/1/522.jpg\n",
      "./face_serve/1/523.jpg\n",
      "./face_serve/1/524.jpg\n",
      "./face_serve/1/525.jpg\n",
      "./face_serve/1/526.jpg\n",
      "./face_serve/1/527.jpg\n",
      "./face_serve/1/528.jpg\n",
      "./face_serve/1/529.jpg\n",
      "./face_serve/1/530.jpg\n",
      "./face_serve/1/531.jpg\n",
      "./face_serve/1/532.jpg\n",
      "./face_serve/1/533.jpg\n",
      "./face_serve/1/534.jpg\n",
      "./face_serve/1/535.jpg\n",
      "./face_serve/1/536.jpg\n",
      "./face_serve/1/537.jpg\n",
      "./face_serve/1/538.jpg\n",
      "./face_serve/1/539.jpg\n",
      "./face_serve/1/540.jpg\n",
      "./face_serve/1/541.jpg\n",
      "./face_serve/1/542.jpg\n",
      "./face_serve/1/543.jpg\n",
      "./face_serve/1/544.jpg\n",
      "./face_serve/1/545.jpg\n",
      "./face_serve/1/546.jpg\n",
      "./face_serve/1/547.jpg\n",
      "./face_serve/1/548.jpg\n",
      "./face_serve/1/549.jpg\n",
      "./face_serve/1/550.jpg\n",
      "./face_serve/1/551.jpg\n",
      "./face_serve/1/552.jpg\n",
      "./face_serve/1/553.jpg\n",
      "./face_serve/1/554.jpg\n",
      "./face_serve/1/555.jpg\n",
      "./face_serve/1/556.jpg\n",
      "./face_serve/1/557.jpg\n",
      "./face_serve/1/558.jpg\n",
      "./face_serve/1/559.jpg\n",
      "./face_serve/1/560.jpg\n",
      "./face_serve/1/561.jpg\n",
      "./face_serve/1/562.jpg\n",
      "./face_serve/1/563.jpg\n",
      "./face_serve/1/564.jpg\n",
      "./face_serve/1/565.jpg\n",
      "./face_serve/1/566.jpg\n",
      "./face_serve/1/567.jpg\n",
      "./face_serve/1/568.jpg\n",
      "./face_serve/1/569.jpg\n",
      "./face_serve/1/570.jpg\n",
      "./face_serve/1/571.jpg\n",
      "./face_serve/1/572.jpg\n",
      "./face_serve/1/573.jpg\n",
      "./face_serve/1/574.jpg\n",
      "./face_serve/1/575.jpg\n",
      "./face_serve/1/576.jpg\n",
      "./face_serve/1/577.jpg\n",
      "./face_serve/1/578.jpg\n",
      "./face_serve/1/579.jpg\n",
      "./face_serve/1/580.jpg\n",
      "./face_serve/1/581.jpg\n",
      "./face_serve/1/582.jpg\n",
      "./face_serve/1/583.jpg\n",
      "./face_serve/1/584.jpg\n",
      "./face_serve/1/585.jpg\n",
      "./face_serve/1/586.jpg\n",
      "./face_serve/1/587.jpg\n",
      "./face_serve/1/588.jpg\n",
      "./face_serve/1/589.jpg\n",
      "./face_serve/1/590.jpg\n",
      "./face_serve/1/591.jpg\n",
      "./face_serve/1/592.jpg\n",
      "./face_serve/1/593.jpg\n",
      "./face_serve/1/594.jpg\n",
      "./face_serve/1/595.jpg\n",
      "./face_serve/1/596.jpg\n",
      "./face_serve/1/597.jpg\n",
      "./face_serve/1/598.jpg\n",
      "./face_serve/1/599.jpg\n",
      "./face_serve/1/600.jpg\n",
      "./face_serve/1/601.jpg\n",
      "./face_serve/1/602.jpg\n",
      "./face_serve/1/603.jpg\n",
      "./face_serve/1/604.jpg\n",
      "./face_serve/1/605.jpg\n",
      "./face_serve/1/606.jpg\n",
      "./face_serve/1/607.jpg\n",
      "./face_serve/1/608.jpg\n",
      "./face_serve/1/609.jpg\n",
      "./face_serve/1/610.jpg\n",
      "./face_serve/1/611.jpg\n",
      "./face_serve/1/612.jpg\n",
      "./face_serve/1/613.jpg\n",
      "./face_serve/1/614.jpg\n",
      "./face_serve/1/615.jpg\n",
      "./face_serve/1/616.jpg\n",
      "./face_serve/1/617.jpg\n",
      "./face_serve/1/618.jpg\n",
      "./face_serve/1/619.jpg\n",
      "./face_serve/1/620.jpg\n",
      "./face_serve/1/621.jpg\n",
      "./face_serve/1/622.jpg\n",
      "./face_serve/1/623.jpg\n",
      "./face_serve/1/624.jpg\n",
      "./face_serve/1/625.jpg\n",
      "./face_serve/1/626.jpg\n",
      "./face_serve/1/627.jpg\n",
      "./face_serve/1/628.jpg\n",
      "./face_serve/1/629.jpg\n",
      "./face_serve/1/630.jpg\n",
      "./face_serve/1/631.jpg\n",
      "./face_serve/1/632.jpg\n",
      "./face_serve/1/633.jpg\n",
      "./face_serve/1/634.jpg\n",
      "./face_serve/1/635.jpg\n",
      "./face_serve/1/636.jpg\n",
      "./face_serve/1/637.jpg\n",
      "./face_serve/1/638.jpg\n",
      "./face_serve/1/639.jpg\n",
      "./face_serve/1/640.jpg\n",
      "./face_serve/1/641.jpg\n",
      "./face_serve/1/642.jpg\n",
      "./face_serve/1/643.jpg\n",
      "./face_serve/1/644.jpg\n",
      "./face_serve/1/645.jpg\n",
      "./face_serve/1/646.jpg\n",
      "./face_serve/1/647.jpg\n",
      "./face_serve/1/648.jpg\n",
      "./face_serve/1/649.jpg\n",
      "./face_serve/1/650.jpg\n",
      "./face_serve/1/651.jpg\n",
      "./face_serve/1/652.jpg\n",
      "./face_serve/1/653.jpg\n",
      "./face_serve/1/654.jpg\n",
      "./face_serve/1/655.jpg\n",
      "./face_serve/1/656.jpg\n",
      "./face_serve/1/657.jpg\n",
      "./face_serve/1/658.jpg\n",
      "./face_serve/1/659.jpg\n",
      "./face_serve/1/660.jpg\n",
      "./face_serve/1/661.jpg\n",
      "./face_serve/1/662.jpg\n",
      "./face_serve/1/663.jpg\n",
      "./face_serve/1/664.jpg\n",
      "./face_serve/1/665.jpg\n",
      "./face_serve/1/666.jpg\n",
      "./face_serve/1/667.jpg\n",
      "./face_serve/1/668.jpg\n",
      "./face_serve/1/669.jpg\n",
      "./face_serve/1/670.jpg\n",
      "./face_serve/1/671.jpg\n",
      "./face_serve/1/672.jpg\n",
      "./face_serve/1/673.jpg\n",
      "./face_serve/1/674.jpg\n",
      "./face_serve/1/675.jpg\n",
      "./face_serve/1/676.jpg\n",
      "./face_serve/1/677.jpg\n",
      "./face_serve/1/678.jpg\n",
      "./face_serve/1/679.jpg\n",
      "./face_serve/1/680.jpg\n",
      "./face_serve/1/681.jpg\n",
      "./face_serve/1/682.jpg\n",
      "./face_serve/1/683.jpg\n",
      "./face_serve/1/684.jpg\n",
      "./face_serve/1/685.jpg\n",
      "./face_serve/1/686.jpg\n",
      "./face_serve/1/687.jpg\n",
      "./face_serve/1/688.jpg\n",
      "./face_serve/1/689.jpg\n",
      "./face_serve/1/690.jpg\n",
      "./face_serve/1/691.jpg\n",
      "./face_serve/1/692.jpg\n",
      "./face_serve/1/693.jpg\n",
      "./face_serve/1/694.jpg\n",
      "./face_serve/1/695.jpg\n",
      "./face_serve/1/696.jpg\n",
      "./face_serve/1/697.jpg\n",
      "./face_serve/1/698.jpg\n",
      "./face_serve/1/699.jpg\n",
      "./face_serve/1/700.jpg\n",
      "./face_serve/1/701.jpg\n",
      "./face_serve/1/702.jpg\n",
      "./face_serve/1/703.jpg\n",
      "./face_serve/1/704.jpg\n",
      "./face_serve/1/705.jpg\n",
      "./face_serve/1/706.jpg\n",
      "./face_serve/1/707.jpg\n",
      "./face_serve/1/708.jpg\n",
      "./face_serve/1/709.jpg\n",
      "./face_serve/1/710.jpg\n",
      "./face_serve/1/711.jpg\n",
      "./face_serve/1/712.jpg\n",
      "./face_serve/1/713.jpg\n",
      "./face_serve/1/714.jpg\n",
      "./face_serve/1/715.jpg\n",
      "./face_serve/1/716.jpg\n",
      "./face_serve/1/717.jpg\n",
      "./face_serve/1/718.jpg\n",
      "./face_serve/1/719.jpg\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./face_serve/1/720.jpg\n",
      "./face_serve/1/721.jpg\n",
      "./face_serve/1/722.jpg\n",
      "./face_serve/1/723.jpg\n",
      "./face_serve/1/724.jpg\n",
      "./face_serve/1/725.jpg\n",
      "./face_serve/1/726.jpg\n",
      "./face_serve/1/727.jpg\n",
      "./face_serve/1/728.jpg\n",
      "./face_serve/1/729.jpg\n",
      "./face_serve/1/730.jpg\n",
      "./face_serve/1/731.jpg\n",
      "./face_serve/1/732.jpg\n",
      "./face_serve/1/733.jpg\n",
      "./face_serve/1/734.jpg\n",
      "./face_serve/1/735.jpg\n",
      "./face_serve/1/736.jpg\n",
      "./face_serve/1/737.jpg\n",
      "./face_serve/1/738.jpg\n",
      "./face_serve/1/739.jpg\n",
      "./face_serve/1/740.jpg\n",
      "./face_serve/1/741.jpg\n",
      "./face_serve/1/742.jpg\n",
      "./face_serve/1/743.jpg\n",
      "./face_serve/1/744.jpg\n",
      "./face_serve/1/745.jpg\n",
      "./face_serve/1/746.jpg\n",
      "./face_serve/1/747.jpg\n",
      "./face_serve/1/748.jpg\n",
      "./face_serve/1/749.jpg\n",
      "./face_serve/1/750.jpg\n",
      "./face_serve/1/751.jpg\n",
      "./face_serve/1/752.jpg\n",
      "./face_serve/1/753.jpg\n",
      "./face_serve/1/754.jpg\n",
      "./face_serve/1/755.jpg\n",
      "./face_serve/1/756.jpg\n",
      "./face_serve/1/757.jpg\n",
      "./face_serve/1/758.jpg\n",
      "./face_serve/1/759.jpg\n",
      "./face_serve/1/760.jpg\n",
      "./face_serve/1/761.jpg\n",
      "./face_serve/1/762.jpg\n",
      "./face_serve/1/763.jpg\n",
      "./face_serve/1/764.jpg\n",
      "./face_serve/1/765.jpg\n",
      "./face_serve/1/766.jpg\n",
      "./face_serve/1/767.jpg\n",
      "./face_serve/1/768.jpg\n",
      "./face_serve/1/769.jpg\n",
      "./face_serve/1/770.jpg\n",
      "./face_serve/1/771.jpg\n",
      "./face_serve/1/772.jpg\n",
      "./face_serve/1/773.jpg\n",
      "./face_serve/1/774.jpg\n",
      "./face_serve/1/775.jpg\n",
      "./face_serve/1/776.jpg\n",
      "./face_serve/1/777.jpg\n",
      "./face_serve/1/778.jpg\n",
      "./face_serve/1/779.jpg\n",
      "./face_serve/1/780.jpg\n",
      "./face_serve/1/781.jpg\n",
      "./face_serve/1/782.jpg\n",
      "./face_serve/1/783.jpg\n",
      "./face_serve/1/784.jpg\n",
      "./face_serve/1/785.jpg\n",
      "./face_serve/1/786.jpg\n",
      "./face_serve/1/787.jpg\n",
      "./face_serve/1/788.jpg\n",
      "./face_serve/1/789.jpg\n",
      "./face_serve/1/790.jpg\n",
      "./face_serve/1/791.jpg\n",
      "./face_serve/1/792.jpg\n",
      "./face_serve/1/793.jpg\n",
      "./face_serve/1/794.jpg\n",
      "./face_serve/1/795.jpg\n",
      "./face_serve/1/796.jpg\n",
      "./face_serve/1/797.jpg\n",
      "./face_serve/1/798.jpg\n",
      "./face_serve/1/799.jpg\n",
      "./face_serve/1/800.jpg\n",
      "./face_serve/1/801.jpg\n",
      "./face_serve/1/802.jpg\n",
      "./face_serve/1/803.jpg\n",
      "./face_serve/1/804.jpg\n",
      "./face_serve/1/805.jpg\n",
      "./face_serve/1/806.jpg\n",
      "./face_serve/1/807.jpg\n",
      "./face_serve/1/808.jpg\n",
      "./face_serve/1/809.jpg\n",
      "./face_serve/1/810.jpg\n",
      "./face_serve/1/811.jpg\n",
      "./face_serve/1/812.jpg\n",
      "./face_serve/1/813.jpg\n",
      "./face_serve/1/814.jpg\n",
      "./face_serve/1/815.jpg\n",
      "./face_serve/1/816.jpg\n",
      "./face_serve/1/817.jpg\n",
      "./face_serve/1/818.jpg\n",
      "./face_serve/1/819.jpg\n",
      "./face_serve/1/820.jpg\n",
      "./face_serve/1/821.jpg\n",
      "./face_serve/1/822.jpg\n",
      "./face_serve/1/823.jpg\n",
      "./face_serve/1/824.jpg\n",
      "./face_serve/1/825.jpg\n",
      "./face_serve/1/826.jpg\n",
      "./face_serve/1/827.jpg\n",
      "./face_serve/1/828.jpg\n",
      "./face_serve/1/829.jpg\n",
      "./face_serve/1/830.jpg\n",
      "./face_serve/1/831.jpg\n",
      "./face_serve/1/832.jpg\n",
      "./face_serve/1/833.jpg\n",
      "./face_serve/1/834.jpg\n",
      "./face_serve/1/835.jpg\n",
      "./face_serve/1/836.jpg\n",
      "./face_serve/1/837.jpg\n",
      "./face_serve/1/838.jpg\n",
      "./face_serve/1/839.jpg\n",
      "./face_serve/1/840.jpg\n",
      "./face_serve/1/841.jpg\n",
      "./face_serve/1/842.jpg\n",
      "./face_serve/1/843.jpg\n",
      "./face_serve/1/844.jpg\n",
      "./face_serve/1/845.jpg\n",
      "./face_serve/1/846.jpg\n",
      "./face_serve/1/847.jpg\n",
      "./face_serve/1/848.jpg\n",
      "./face_serve/1/849.jpg\n",
      "./face_serve/1/850.jpg\n",
      "./face_serve/1/851.jpg\n",
      "./face_serve/1/852.jpg\n",
      "./face_serve/1/853.jpg\n",
      "./face_serve/1/854.jpg\n",
      "./face_serve/1/855.jpg\n",
      "./face_serve/1/856.jpg\n",
      "./face_serve/1/857.jpg\n",
      "./face_serve/1/858.jpg\n",
      "./face_serve/1/859.jpg\n",
      "./face_serve/1/860.jpg\n",
      "./face_serve/1/861.jpg\n",
      "./face_serve/1/862.jpg\n",
      "./face_serve/1/863.jpg\n",
      "./face_serve/1/864.jpg\n",
      "./face_serve/1/865.jpg\n",
      "./face_serve/1/866.jpg\n",
      "./face_serve/1/867.jpg\n",
      "./face_serve/1/868.jpg\n",
      "./face_serve/1/869.jpg\n",
      "./face_serve/1/870.jpg\n",
      "./face_serve/1/871.jpg\n",
      "./face_serve/1/872.jpg\n",
      "./face_serve/1/873.jpg\n",
      "./face_serve/1/874.jpg\n",
      "./face_serve/1/875.jpg\n",
      "./face_serve/1/876.jpg\n",
      "./face_serve/1/877.jpg\n",
      "./face_serve/1/878.jpg\n",
      "./face_serve/1/879.jpg\n",
      "./face_serve/1/880.jpg\n",
      "./face_serve/1/881.jpg\n",
      "./face_serve/1/882.jpg\n",
      "./face_serve/1/883.jpg\n",
      "./face_serve/1/884.jpg\n",
      "./face_serve/1/885.jpg\n",
      "./face_serve/1/886.jpg\n",
      "./face_serve/1/887.jpg\n",
      "./face_serve/1/888.jpg\n",
      "./face_serve/1/889.jpg\n",
      "./face_serve/1/890.jpg\n",
      "./face_serve/1/891.jpg\n",
      "./face_serve/1/892.jpg\n",
      "./face_serve/1/893.jpg\n",
      "./face_serve/1/894.jpg\n",
      "./face_serve/1/895.jpg\n",
      "./face_serve/1/896.jpg\n",
      "./face_serve/1/897.jpg\n",
      "./face_serve/1/898.jpg\n",
      "./face_serve/1/899.jpg\n",
      "./face_serve/1/900.jpg\n",
      "./face_serve/1/901.jpg\n",
      "./face_serve/1/902.jpg\n",
      "./face_serve/1/903.jpg\n",
      "./face_serve/1/904.jpg\n",
      "./face_serve/1/905.jpg\n",
      "./face_serve/1/906.jpg\n",
      "./face_serve/1/907.jpg\n",
      "./face_serve/1/908.jpg\n",
      "./face_serve/1/909.jpg\n",
      "./face_serve/1/910.jpg\n",
      "./face_serve/1/911.jpg\n",
      "./face_serve/1/912.jpg\n",
      "./face_serve/1/913.jpg\n",
      "./face_serve/1/914.jpg\n",
      "./face_serve/1/915.jpg\n",
      "./face_serve/1/916.jpg\n",
      "./face_serve/1/917.jpg\n",
      "./face_serve/1/918.jpg\n",
      "./face_serve/1/919.jpg\n",
      "./face_serve/1/920.jpg\n",
      "./face_serve/1/921.jpg\n",
      "./face_serve/1/922.jpg\n",
      "./face_serve/1/923.jpg\n",
      "./face_serve/1/924.jpg\n",
      "./face_serve/1/925.jpg\n",
      "./face_serve/1/926.jpg\n",
      "./face_serve/1/927.jpg\n",
      "./face_serve/1/928.jpg\n",
      "./face_serve/1/929.jpg\n",
      "./face_serve/1/930.jpg\n",
      "./face_serve/1/931.jpg\n",
      "./face_serve/1/932.jpg\n",
      "./face_serve/1/933.jpg\n",
      "./face_serve/1/934.jpg\n",
      "./face_serve/1/935.jpg\n",
      "./face_serve/1/936.jpg\n",
      "./face_serve/1/937.jpg\n",
      "./face_serve/1/938.jpg\n",
      "./face_serve/1/939.jpg\n",
      "./face_serve/1/940.jpg\n",
      "./face_serve/1/941.jpg\n",
      "./face_serve/1/942.jpg\n",
      "./face_serve/1/943.jpg\n",
      "./face_serve/1/944.jpg\n",
      "./face_serve/1/945.jpg\n",
      "./face_serve/1/946.jpg\n",
      "./face_serve/1/947.jpg\n",
      "./face_serve/1/948.jpg\n",
      "./face_serve/1/949.jpg\n",
      "./face_serve/1/950.jpg\n",
      "./face_serve/1/951.jpg\n",
      "./face_serve/1/952.jpg\n",
      "./face_serve/1/953.jpg\n",
      "./face_serve/1/954.jpg\n",
      "./face_serve/1/955.jpg\n",
      "./face_serve/1/956.jpg\n",
      "./face_serve/1/957.jpg\n",
      "./face_serve/1/958.jpg\n",
      "./face_serve/1/959.jpg\n",
      "./face_serve/1/960.jpg\n",
      "./face_serve/1/961.jpg\n",
      "./face_serve/1/962.jpg\n",
      "./face_serve/1/963.jpg\n",
      "./face_serve/1/964.jpg\n",
      "./face_serve/1/965.jpg\n",
      "./face_serve/1/966.jpg\n",
      "./face_serve/1/967.jpg\n",
      "./face_serve/1/968.jpg\n",
      "./face_serve/1/969.jpg\n",
      "./face_serve/1/970.jpg\n",
      "./face_serve/1/971.jpg\n",
      "./face_serve/1/972.jpg\n",
      "./face_serve/1/973.jpg\n",
      "./face_serve/1/974.jpg\n",
      "./face_serve/1/975.jpg\n",
      "./face_serve/1/976.jpg\n",
      "./face_serve/1/977.jpg\n",
      "./face_serve/1/978.jpg\n",
      "./face_serve/1/979.jpg\n",
      "./face_serve/1/980.jpg\n",
      "./face_serve/1/981.jpg\n",
      "./face_serve/1/982.jpg\n",
      "./face_serve/1/983.jpg\n",
      "./face_serve/1/984.jpg\n",
      "./face_serve/1/985.jpg\n",
      "./face_serve/1/986.jpg\n",
      "./face_serve/1/987.jpg\n",
      "./face_serve/1/988.jpg\n",
      "./face_serve/1/989.jpg\n",
      "./face_serve/1/990.jpg\n",
      "./face_serve/1/991.jpg\n",
      "./face_serve/1/992.jpg\n",
      "./face_serve/1/993.jpg\n",
      "./face_serve/1/994.jpg\n",
      "./face_serve/1/995.jpg\n",
      "./face_serve/1/996.jpg\n",
      "./face_serve/1/997.jpg\n",
      "./face_serve/1/998.jpg\n",
      "./face_serve/1/999.jpg\n",
      "./face_serve/1/1000.jpg\n"
     ]
    }
   ],
   "source": [
    "#!/usr/bin/env python\n",
    "# -*- coding: utf-8 -*-\n",
    "__author__ = 'Seven'\n",
    "import cv2 \n",
    "def CatchPICFromVideo(catch_num, path_name):\n",
    "    face_cascade = cv2.CascadeClassifier(facePath) \n",
    "    # haarcascade_frontalface_alt2\n",
    "    camera = cv2.VideoCapture(0)#参数是0，表示打开笔记本的内置摄像头\n",
    "    num = 0\n",
    "    while True:\n",
    "        ret, frame = camera.read()\n",
    "        gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)\n",
    "        faces = face_cascade.detectMultiScale(gray, 1.1, 5)\n",
    "        for (x, y, w, h) in faces:\n",
    "            img_name = f'{path_name}/{str(num)}.jpg'\n",
    "            \"\"\"\n",
    "            path_name = '1'\n",
    "            num = 2\n",
    "            img_name = f'{path_name}/{str(num)}.jpg'\n",
    "            img_name\n",
    "            输出:'1/2.jpg'\n",
    "\n",
    "            \"\"\"\n",
    "            # 以 f开头表示在字符串内支持大括号内的python 表达式\n",
    "            image = frame[y:y + h, x:x + w]#提取方框内像素\n",
    "            print(img_name)\n",
    "            cv2.imwrite(img_name, image)#将image矩阵写入当前文件夹下的名为img_name图片文件\n",
    "            num += 1#控制生成图片名字\n",
    "            if num > catch_num:\n",
    "                break\n",
    " \n",
    "            # 画出矩形框圈出人脸\n",
    "            cv2.rectangle(frame, (x, y), (x + w, y + h), (255, 0, 0), 2)\n",
    "            # 显示捕捉了多少张人脸\n",
    "            font = cv2.FONT_HERSHEY_SIMPLEX\n",
    "            cv2.putText(frame, f'num:{str(num)}', (x + 30, y + 30), font, 1, (255, 0, 255), 4)\n",
    "        if num > catch_num:\n",
    "            break\n",
    "        # 显示图像\n",
    "        cv2.imshow('camera', frame)\n",
    "        if cv2.waitKey(1) & 0xFF == ord('q'):\n",
    "            break\n",
    "    camera.release()\n",
    "    cv2.destroyAllWindows()\n",
    " \n",
    " \n",
    "if __name__ == '__main__':\n",
    "    CatchPICFromVideo(1000, './face_serve/1')\n",
    "    CatchPICFromVideo(1000, './face_serve/0')    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 问题: 噪声太多.\n",
    "解决方式:先人工删除噪声;再写判断条件载入新数据"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
